<%@page import="schedule.ScheduleMyba"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("UTF-8");
%>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="naver-site-verification"
	content="90b0d706fa56cb9c5914b512616189b76aad1db5" />
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">
<title>대출이자 계산기</title>
</head>
<body>
	<jsp:useBean id="vo" class="schedule.Sv" />
	<jsp:setProperty property="*" name="vo" />
	
	<%
	ScheduleMyba s=new ScheduleMyba();
	
		String pback = "";
		if (vo.getPD_PBACK().equals("원리금균등상환")) {
			pback = "0";
		} else if (vo.getPD_PBACK().equals("원금균등상환")) {
			pback = "1";
		} else if (vo.getPD_PBACK().equals("원금만기상환")) {
			pback = "2";
		}
	%>
	<div style="display:none"></div>
	<input type="text" value='<%=vo.getCS_REM()+"0000"%>' id='s1'>
	<input type="text" value="<%=vo.getPD_PRD()%>" id='s2'>
	<input type="text" value="<%=vo.getPD_RATE()%>" id='s3'>
	<input type="text" value="<%=pback%>" id='s4'>
	<input type="text" value="<%=vo.getCT_NO()%>" id='s5'>
	<input type="text" value="<%=vo.getSA_NO()%>" id='s6'>
	<input type="text" value="1" id='s7'>
	<input type="text" value="2" id='s8'>
	<button type="button" class="btn btn-primary" onclick="doCalc();">계산하기</button>
	<button type="button" class="btn btn-default" onclick="reset();">초기화</button>
	</p>

	<div class="calculatorResult" style="width: 1000px;">
		<p class="txtResult">계산결과</p>
		<div class="table-responsive">
			<table class="table" id="table1"
				summary="이 표는 대출금 상환금액과 일정 계산 결과를 나타내며, 대출금액, 대출기간, 대출금리, 상환주기, 상환방법, 상환금, 총이자 항목으로 구성되어 있습니다.">
				<caption></caption>
				<thead>
					<tr>
						<th scope="col">대출금액</th>
						<th scope="col">대출기간</th>
						<th scope="col">대출금리</th>
						<th scope="col">상환주기</th>
						<th scope="col">상환방법</th>
						<th scope="col">상환금</th>
						<th scope="col" class="nbr">총이자</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="tRight"></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td class="tRight"></td>
						<td class="tRight nbr"></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="table-responsive">
			<form name='frm' id='frm' method="post">
				<table class="table table-hover text-right" id="table2"
					summary="이 표는 대출금 상환금액과 일정 계산 결과를 나타내며, 회차, 상환일, 상환금, 납입원금, 이자, 납입원금합계, 잔금 항목으로 구성되어 있습니다.">
					<caption></caption>
					<thead>
						<tr>
							<th>회차</th>
							<th scope="col">상환금</th>
							<th scope="col">납입원금</th>
							<th scope="col">이자</th>
							<th scope="col">납입원금 합계</th>
							<th scope="col" class="nbr">잔금</th>
						</tr>
					</thead>
					<tbody id="tbody">
						<tr id="trbody">
							<td></td>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
							<td class="nbr"></td>
						</tr>
					</tbody>
				</table>
				
				<div id="div1">
				
				</div>
				<input type="submit" value="스케줄입력" class='btn btn-info'>
			</form>
			<br>
		</div>
	</div>





	<!-- } 콘텐츠 끝 -->


	<script>
		$(function() {
			// 폰트 리사이즈 쿠키있으면 실행
			font_resize("container", get_cookie("ck_font_resize_rmv_class"),
					get_cookie("ck_font_resize_add_class"));
		});
	</script>

	<!-- ie6,7에서 사이드뷰가 게시판 목록에서 아래 사이드뷰에 가려지는 현상 수정 -->
	<!--[if lte IE 7]>
<script>
$(function() {
    var $sv_use = $(".sv_use");
    var count = $sv_use.length;

    $sv_use.each(function() {
        $(this).css("z-index", count);
        $(this).css("position", "relative");
        count = count - 1;
    });
});
</script>
<![endif]-->
	<script type="text/javascript">
		doCalc()
	</script>
	<!-- <script type="text/javascript">
		schedule()
	</script> -->
</body>
</html>
